#ifndef _VEML6030_H_
#define _VEML6030_H_

#include <types.h>

#define VEML6030_ADDR       0x10
  
#define REG_CONFIGURE             0x00
#define REG_THR_H                 0x01
#define REG_THR_L                 0x02
#define REG_PSM                   0x03
#define REG_ALSHR_DT              0x04
#define REG_WHITE_DT              0x05
#define REG_INT                   0x06

#define CONFIGURE_SHUT_DOWN       0x0001
#define CONFIGURE_POWER_0N        0xFFFE

#define VALUE_CONFIGURE           0x0000
#define VALUE_THR_H               0x0000
#define VALUE_THR_L               0x0000
#define VALUE_PSM                 0x0000


#define IT_800                    0x00C0                       
#define IT_400                    0x0080
#define IT_200                    0x0040
#define IT_100                    0x0000
#define IT_50                     0x0200
#define IT_25                     0x0300
#define IT_MASK                   0x03C0


#define ALS_GAIN_1                0x0000
#define ALS_GAIN_2                0x0800
#define ALS_GAIN_1_4              0x1800
#define ALS_GAIN_1_8              0x1000
#define ALS_GAIN_MASK             0x1800

#define  RESOLUTION      1.8432  

enum 
{
    E_RANGE = 0x00,
    E_TIME,
    E_GAIN,
    E_RESOUL,
};

typedef struct  config_s
{
    uint32_t  max_range;
    uint16_t int_time;
    uint16_t  gain;
    float     resolution;

}config_t;


err_t veml6030_init(const char *i2c_bus_name);


//err_t isl29026_init(const char *i2c_bus_name);

//void get_illumination(void);
#endif
